/*
 * Copyright(c) 2020-2100 万达信息股份有限公司 版权所有
 * WONDERS INFORMATION CO., LTD. ALL RIGHTS RESERVED.
 */

package com.wondersgroup.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: huym
 * @version: 1.0
 * @date: 2020/11/23
 */
@RestController
@RefreshScope // 代码中配置自动刷新
public class TestController {

    @Value("${user.name}")
    private String name;

    @GetMapping("/test")
    public String test(){
        return "configclient当前用户名："+name;
    }

}
